package com.transaction.simulate.mapper;

import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface SequenceUtilMapper {

    @Select({"SELECT NEXTVAL(#{sequenceName})"})
    @Options(flushCache= Options.FlushCachePolicy.TRUE)
    String getNextValue(String sequenceName);

    @Update("SELECT SETVAL(#{sequenceName},0)")
    void resetValue(String sequenceName);
}
